<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>相邻兄弟选择器</title>
    <style>
        input + label {
          color: #2ecc71;
          font-weight: bold;
          cursor: pointer;
          transition: all 0.3s;
        }
        
        input + label:hover {
          color: #e74c3c;
          text-decoration: underline;
        }
      </style>
    </head>
    <body>
      <input id="a" type="checkbox">
      <label for="a">开关</label>
      
      <label>其它标签</label>
      
      <div style="margin-top: 20px;">
        <input id="b" type="radio">
        <label for="b">单选按钮</label>
      </div>
    </body>
    </html>
    